package com.ruoyi.web.controller.workflow;

import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.workflow.service.IDoneTaskService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("/workflow/task")
public class DoneTaskController {

    @Autowired
    private IDoneTaskService doneTaskService;

    /**
     * 查询已办任务
     * @param params 根据日期时间搜索
     * @return
     */
    @PreAuthorize("@ss.hasPermi('workflow:task:done')")
    @GetMapping("done")
    public TableDataInfo done(@RequestParam Map<String,Object> params){
        return doneTaskService.done(params);
    }
}
